import { defineStore } from "pinia";
export const useAppStore = defineStore({
  id: "app111",
  state: () => {
    return {
      appKey: "app",
      name: "123",
    };
  },
  actions: {
    setData(data) {
      this.name = 456;
    //   alert(data);
    },
  },
  persist: {
    enabled: true,
    strategies: [
      {
        key: "my_app",
        storage: sessionStorage ,
        paths: ["name", "appKey"],
      },
    ],
  },
});
